<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>项目基本信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/project/projectbasicinfo/projectBasicinfo/list">项目基本信息列表</a></li>
		<li class="active"><a href="${ctx}/project/projectbasicinfo/projectBasicinfo/form?id=${projectBasicinfo.id}">项目基本信息<shiro:hasPermission name="project:projectbasicinfo:projectBasicinfo:edit">${not empty projectBasicinfo.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="project:projectbasicinfo:projectBasicinfo:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="projectBasicinfo" action="${ctx}/project/projectbasicinfo/projectBasicinfo/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<%--<sys:message content="${message}"/>--%>
		<div class="control-group">
			<label class="control-label">项目名称：</label>
			<div class="controls">
				<%--<form:input path="projectName" htmlEscape="false" maxlength="1" class="input-xlarge "/>--%>
				<input type="text" id="projectName" value="${project.projectName}" class="input-xlarge "/>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label">项目类型：</label>
			<div class="controls">
				<%--<form:input path="projectTypeId" htmlEscape="false" maxlength="64" class="input-xlarge "/>--%>
				<input type="text" id="projectTypeId" value="${project.projectTypeId}"  class="input-xlarge "/>
				<select class="form-control  col-sm-3" name="account">
					<c:forEach var="projectType" items="${projectTypeList}">
						<option value="${projectType.id}">${projectType.id} / ${projectType.typeName}</option>
					</c:forEach>
				</select>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label">项目负责人：</label>
			<div class="controls">
				<form:input path="projectLeader" htmlEscape="false" maxlength="64" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">项目联系人：</label>
			<div class="controls">
				<form:input path="projectContact" htmlEscape="false" maxlength="64" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">联系人邮箱：</label>
			<div class="controls">
				<form:input path="contactEmail" htmlEscape="false" maxlength="64" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">联系人电话：</label>
			<div class="controls">
				<form:input path="contactPhone" htmlEscape="false" maxlength="64" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">牵头单位：</label>
			<div class="controls">
				<form:input path="leadUnit" htmlEscape="false" maxlength="64" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">项目简介：</label>
			<div class="controls">
				<form:input path="projectIntroduction" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>

		<div class="form-actions">
			<shiro:hasPermission name="project:projectbasicinfo:projectBasicinfo:edit">
				<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
			<c:if test="${project.id !=null}">
				<a id="nextSubmit" href="${ctx}/project/projectprocess/projectProcess/list?projectId=${project.id}" class="btn btn-primary" type="button">下一步</a>
			</c:if>
		</div>
	</form:form>
</body>
</html>